package top.fangwenmagician.killfire.entity;

import net.minecraft.entity.EntityType;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.projectile.thrown.ThrownItemEntity;
import net.minecraft.item.Item;
import net.minecraft.util.math.BlockBox;
import net.minecraft.util.math.Vec3i;
import net.minecraft.world.World;
import top.fangwenmagician.killfire.KillFireMod;

public class IceHeartEntityLv3 extends IceHeartEntity {
    public IceHeartEntityLv3(EntityType<? extends ThrownItemEntity> entityType, World world) {
        super(entityType, world);
    }

    public IceHeartEntityLv3(World world, LivingEntity owner) {
        super(KillFireMod.iceHeartEntityTypeLv3, owner, world);
    }

    public IceHeartEntityLv3(World world, double x, double y, double z) {
        super(KillFireMod.iceHeartEntityTypeLv3, x, y, z, world);
    }

    @Override
    protected BlockBox getBlockBox(Vec3i hitResultPos) {
        Vec3i minV = hitResultPos.add(-32, -32, -32);
        Vec3i maxV = hitResultPos.add(32, 32, 32);
        return new BlockBox(minV.getX(), Math.max(minV.getY(), -64), minV.getZ(), maxV.getX(), Math.min(maxV.getY(), 319), maxV.getZ());
    }

    @Override
    protected Item getDefaultItem() {
        return KillFireMod.iceHeartItemLv3;
    }
}
